#ifndef ORDINARY_H
#define ORDINARY_H

#include <string>
#include <mutex>
#include <condition_variable>
#include "HistoryManager.h"
#include "CommunicateData.h"
#include <gio/gio.h>
#include <gio/giotypes.h>
#include <genai/text/chat.h>

using namespace std;


class Ordinary {
public:
    Ordinary();
    ~Ordinary();

    string chat_with_model(string input_text);

private:
    GenAiTextSession *session;
    ChatModelConfig *config;
    HistoryManager *historyManager;

    std::mutex sync_mutex;
    std::condition_variable cv;
    bool reply_ready = false;

    static void chat_callback(ChatResult* result, void* user_data);
};

#endif
